import {createRouter, createWebHistory} from 'vue-router'
import Home from '../Home.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/Movies',
        name: 'Movies',
        component: () => import('../Movies.vue'),
        children: [
            {
                path: 'Category/All',
                name: 'allCategory',
                component: () => import('../components/data_visualization/AllCategory.vue')
            },
            {
                path: 'Category/Every',
                name: 'everyCategory',
                component: () => import('../components/data_visualization/EveryCategory.vue')
            },
            {
                path: 'Top50Movies',
                name: 'Top50Movies',
                component: () => import('../components/data_visualization/Top50Movies.vue')
            },
            {
                path: 'AnnualReport',
                name: 'AnnualReport',
                component: () => import('../components/data_visualization/AnnualReport.vue')
            },
            {
                path: 'Company',
                name: 'Company',
                component: () => import('../components/data_visualization/Company.vue')
            },
            {
                path: 'Director',
                name: 'Director',
                component: () => import('../components/data_visualization/Director.vue')
            }
        ]
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
